const SERVICE = require("../../lib/js/service.js");

Page({
  data:{
    showNoData: false
  },
  onLoad(){
   
  },
  onShow(){
    this.getMyMasterCoin();
  },
  
  /*分享*/
  onShareAppMessage(){

  },

  /**
   * @explain myMasterCoin 我的大师币
   * @param thirdCook 用户标识
   * 
   * */
  getMyMasterCoin(){
    wx.showNavigationBarLoading();
    let _this = this;
    SERVICE.POST(SERVICE.URL.myMasterCoin,{
      thirdCookie: wx.getStorageSync("thirdCookie")
    },(status,res)=>{
      wx.hideNavigationBarLoading();
      if(res.data.status === "success"){
        if(res.data.recordList.length == 0){
         _this.setData({
           showNoData: true
         });
        }else{
          _this.setData({
            info: res.data
          });
        }
        
      }else{
        wx.showToast({
          title: "获取信息失败",
          icon: "none",
          mask: true
        });
      }
    });
  },

});